<?php
namespace Summer\Location\Http\Requests;

use Summer\Hub\Http\Requests\Request;
use Input;
class UserAddressCreateRequest extends Request
{

    /**
     * {@inheritDoc}
     */
    public function data()
    {
        $data = Input::all();
        return $data;
    }
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'consignee' => 'required',
            'phone' => 'required',
            'province_code' => 'required',
            'city_code' => 'required',
            'area_code' => 'required',
            'address' => 'required',
        ];
    }
    public function messages()
    {
        return [
            'consignee.required'    => '请输入收货人信息.',
            'phone.required'    => '请输入收货人手机号.',
            'province_code.required'    => '请选择省份.',
            'city_code.required'    => '请选择城市.',
            'area_code.required'    => '请选择区县.',
            'address.required'    => '请输入收货人地址详情.',
        ];
    }
}
